import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from "vuex-persistedstate"
import { Num } from "./modules/num";
import { User } from "./modules/user";
import { Cart } from "./modules/cart";
import {getters} from './getters'
Vue.use(Vuex)

export default new Vuex.Store({  
  modules: {
    Num,
    User,
    Cart
  },
    
  plugins: [createPersistedState({
    storage: window.localStorage,
    key:'store'
  })],
  getters
})